package liveData.migration.toPhoenix.entity;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @program: LiveDataMigrationToPhoenix
 * @description:
 * @author: sunteng
 * @create: 2020-08-12 11:41
 **/
@Data
public class JobSetting implements Serializable {

    private static final long serialVersionUID = -3396442905405138139L;
    private String taskName;
    private Integer parallelism;
    private Source source;
    private Sink sink;

    @Data
    public class Sink implements Serializable {
        private static final long serialVersionUID = -3753724995318789262L;
        private String mode;
        private String phoenixUrl;
        private String phoenixDriver;
        private String phoenixTable;
    }

    @Data
    public class Source implements Serializable {
        private static final long serialVersionUID = 6296591001602261176L;
        private String mode;
        private String topic;
        private String server;
        private Integer partitionParallel;
        private String mysqlTable;
        private String mysqlPk;
        private List<Long> partitionOffsets;
        private String offsetFlag;
    }
}
